/**
 *  Version:     @(#)aio_poll.h    0.1.17 09/10/2006
 *
 *  Authors:     Hailong Xia <hlxxxx@gmail.com>
 *
 *  This library is free software; you can redistribute it and/or
 *  modify it under the terms of the GNU Lesser General Public
 *  License as published by the Free Software Foundation; either
 *  version 2 of the License, or (at your option) any later version.
 *
 *  This library is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty
 *  of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See
 *  the GNU Lesser General Public License for more details.
 *
 *  You should have received a copy of the GNU Lesser General
 *  Public License along with this library; if not, write to the
 *  Free Software Foundation, Inc., 59 Temple Place, Suite 330,
 *  Boston, MA 02111-1307  USA
 */

#ifndef __AIO_POLL_H
#define __AIO_POLL_H

#ifdef HAVE_CONFIG_H
#include "aio_config.h"
#endif

#ifdef HAVE_SYS_POLL_H
# include <sys/poll.h>
#else

#ifdef __cplusplus
extern "C" {
#endif

#define POLLIN      0x01
#define POLLOUT     0x04
#define POLLERR     0x08
#define POLLHUP     0x10
#define POLLNVAL    0x20

struct pollfd
{
        int fd;
        int events;
        int revents;
};

int poll (struct pollfd *fdarray, int nfds, int timeout);

#ifdef __cplusplus
}
#endif

#endif /* HAVE_SYS_POLL_H */

#endif /* __AIO_POLL_H */
